package queue;

import linearList.Node;

/**
 * 链表存储队列
 * @param <T>
 */
public class LinkedQueue<T> implements Queue<T> {
    private Node<T> front, rear;
    public LinkedQueue() {
        this.front = this.rear = null;
    }

    public String toString() {
        return "to be done.";
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    @Override
    public boolean add(T x) {
        return false;
    }

    @Override
    public T peek() {
        return null;
    }

    @Override
    public T poll() {
        return null;
    }

    public static void main(String args[])
    {
        LinkedQueue<Integer> q = new LinkedQueue<Integer>();
        q.add(new Integer(10));
        q.add(new Integer(20));
        System.out.println("poll : "+q.poll().toString()+"  "+q.poll().toString()+"  ");
        System.out.println(q.toString());
        q.add(new Integer(30));
        q.add(new Integer(40));
        q.add(new Integer(50));
        q.add(new Integer(60));
        System.out.println(q.toString());
        q.add(new Integer(70));
        System.out.println(q.toString());
    }

}
